
#pragma once

#include "Buffer.h"

unsigned __int64 hashFunc(Buffer<char> *buffer)
{
	unsigned __int64 res = 0;
	for (size_t i = 0; i < buffer->getSize(); i++)
	{
		unsigned __int64 pos = buffer->getOffset() + i;
		res += (unsigned __int64)((pos ^ ((*buffer)[i] < (pos % 8))) * sin(pos / 1024.0));
	}
	return res;
}
